<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="common/head :: htmlhead">
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">添加其他单位</div>
                <div class="layui-card-body">
                    <form class="layui-form" action="" lay-filter="component-form-element">
                        <!--第一行：名称和类型-->
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">单位名称</label>
                                <div class="layui-input-block">
                                    <input type="text" name="name" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">单位类型</label>
                                <div class="layui-input-block">
                                    <select name="unittype" lay-verify="required">
                                        <option value=""></option>
                                        <option value="0">有限责任公司</option>
                                        <option value="1">股份有限公司</option>
                                        <option value="2">其他企业法人</option>
                                        <option value="3">个人独资企业</option>
                                        <option value="4">合伙企业</option>
                                        <option value="5">不具有法人资格的专业服务机构</option>
                                        <option value="6">事业单位</option>
                                        <option value="7">社会团体</option>
                                        <option value="8">基金会</option>
                                        <option value="9">社会服务机构</option>
                                        <option value="10">机关法人</option>
                                        <option value="11">农村集体经济组织法人</option>
                                        <option value="12">城镇农村的合作经济组织法人</option>
                                        <option value="13">基层群众性自治组织法人</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <!--第二行：联系人和职务-->
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">联系人</label>
                                <div class="layui-input-block">
                                    <input type="text" name="linker" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">职务</label>
                                <div class="layui-input-block">
                                    <input type="text" name="linkerjob" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <!--第三行：手机座机-->
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">手机</label>
                                <div class="layui-input-block">
                                    <input type="text" name="mobilephone" lay-verify="required|phone" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">座机</label>
                                <div class="layui-input-block">
                                    <input type="text" name="phone" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <!--第四行：邮箱邮编-->
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">电子邮箱</label>
                                <div class="layui-input-block">
                                    <input type="text" name="email" lay-verify="required|email" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">邮编</label>
                                <div class="layui-input-block">
                                    <input type="number" name="postcode" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <!--第五行：地址-->
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-col-lg6" id="area-picker">
                                <label class="layui-form-label">省市</label>
                                <div class="layui-input-inline layui-col-lg3">
                                    <select name="province" class="province-selector" lay-filter="province-1">
                                        <option value="">请选择省</option>
                                    </select>
                                </div>
                                <div class="layui-input-inline layui-col-lg3" >
                                    <select name="city" class="city-selector" lay-filter="city-1">
                                        <option value="">请选择市</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-col-lg4">
                                <label class="layui-form-label">详细地址</label>
                                <div class="layui-input-block">
                                    <input type="text" name="address" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <!--第六行：成立时间、注册资本-->
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">成立时间</label>
                                <div class="layui-input-block">
                                    <input type="text" name="founddate" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input" id="date1">
                                </div>
                            </div>
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">注册资本</label>
                                <div class="layui-input-block">
                                    <input type="number" name="registerasset" lay-verify="required" placeholder="万元"
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <!--第七行：法人代表、统一社会信用代码-->
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">法人代表</label>
                                <div class="layui-input-block">
                                    <input type="text" name="faren" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">统一社会信用代码</label>
                                <div class="layui-input-block">
                                    <input type="text" name="creditcode" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <!--第八行：官网、组织机构代码-->
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">官网</label>
                                <div class="layui-input-block">
                                    <input type="text" name="officialweb" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">组织机构代码</label>
                                <div class="layui-input-block">
                                    <input type="text" name="groupid" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <!--第九行：核准日期、登记机关-->
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">核准日期</label>
                                <div class="layui-input-block">
                                    <input type="text" name="approvaldate" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input" id="date2">
                                </div>
                            </div>
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">登记机关</label>
                                <div class="layui-input-block">
                                    <input type="text" name="registeroffice" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <!--第十行：营业期限、经营状态-->
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">营业期限</label>
                                <div class="layui-input-block">
                                    <input type="text" name="operationperiod" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">经营状态</label>
                                <div class="layui-input-block">
                                    <input type="text" name="operatestatus" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <!--第十一行：面临问题-->
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-col-lg10">
                                <label class="layui-form-label">面临问题</label>
                                <div class="layui-input-block">
                                    <input type="text" name="question" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <!--第十二行： 从业人数-->
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-col-lg6">
                                <label class="layui-form-label">从业人数</label>
                                <div class="layui-input-block">
                                    <input type="number" name="employeenum" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <!--第十三行：所属行业-->
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-col-lg10">
                                <label class="layui-form-label">所属行业</label>
                                <div class="layui-input-block">
                                    <input class="layui-input" readonly="readonly"type="text" name="industrytype" id="hangye"
                                            onkeyup="IndustrialClassification()" onclick="IndustrialClassification()" lay-verify="required">
                                    <input type="hidden" id="hangyetag" value="0">
                                </div>
                            </div>
                        </div>
                        <!--第十四行：业务范围-->
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-col-lg10">
                                <label class="layui-form-label">业务范围</label>
                                <div class="layui-input-block">
                                    <input type="text" name="businessrange" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <!--第十五行：单位介绍-->
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-col-lg10">
                                <label class="layui-form-label">单位介绍</label>
                                <div class="layui-input-block">
                                    <textarea name="groupintroduct" placeholder="重点介绍与博物馆工作有关情况" class="layui-textarea"></textarea>
                                </div>
                            </div>
                        </div>
                        <!--提交&重置-->
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="component-form-element">提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    layui.config({
        base: '/static/lib/' //静态资源所在路径
    }).extend({
        index: 'index' //主入口模块
    }).use(['index', 'form','layarea'], function(){
        var $ = layui.$
            ,admin = layui.admin
            ,element = layui.element
            ,layer = layui.layer
            ,laydate = layui.laydate
            ,layarea = layui.layarea
            ,form = layui.form;

        layarea.render({
            elem: '#area-picker',
            change: function (res) {
                //选择结果
                console.log(res);
            }
        });

        form.render(null, 'component-form-element');
        element.render('breadcrumb', 'breadcrumb');

        form.on('submit(component-form-element)', function(data){
            $.ajax({
                url:"/submitoth",
                async: false,
                type:"POST",
                dataType: "text",
                data:data.field,
                success: function(data){
                    if(data==="success_oth"){
                        layer.open({
                            title: '提交成功'
                            ,content: '其他单位会员已添加！'
                            ,yes: function(index, layero){
                                parent.layui.admin.events.closeThisTabs();
                                top.layui.index.openTabsPage("/datashow/oth", "其他单位信息");
                            }
                        });
                    }
                }
            });
            return false;
        });
    });
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        //执行一个laydate实例
        laydate.render({
            elem: '#date1' //指定元素
            ,format:'yyyy/MM/dd'
        });
        laydate.render({
            elem: '#date2' //指定元素
            ,format:'yyyy/MM/dd'
        });
    });
</script>
<script type="text/javascript" src="/static/js/hangye.js"></script>
</body>
</html>